package net.xiaosaguo.mymall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import net.xiaosaguo.common.utils.PageUtils;
import net.xiaosaguo.mymall.member.entity.MemberEntity;
import net.xiaosaguo.mymall.member.exception.PhoneExistException;
import net.xiaosaguo.mymall.member.exception.UniqueCheckFailureException;
import net.xiaosaguo.mymall.member.exception.UsernameExistException;
import net.xiaosaguo.mymall.member.vo.MemberLoginVO;
import net.xiaosaguo.mymall.member.vo.MemberRegisterVO;
import net.xiaosaguo.mymall.member.vo.WeiboSocialUser;

import java.util.Map;

/**
 * 会员
 *
 * @author xiaosaguo
 * @email guoyx@vip.qq.com
 * @date 2020-06-05 01:36:03
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void register(MemberRegisterVO vo);

    void checkEmailUnique(String email) throws UniqueCheckFailureException;

    void checkUsernameUnique(String username) throws UsernameExistException;

    void checkPhoneUnique(String phone) throws PhoneExistException;

    MemberEntity login(MemberLoginVO vo);

    MemberEntity login(WeiboSocialUser vo);
}

